<?php
 require('../db_connect.php');
?>
<html>
<header>
<title>json tester</title>
<script type="text/javascript" src="realm_tool.js"></script>
<script src="http://swankestlabs.com/smallsmallworld/prototype_js/prototype-1.6.0.2.js"></script>
<script type="text/javascript">
function test_json(){
var req = new XMLHttpRequest();
req.open("GET", "get_realms.php", true); 
req.onreadystatechange = checkState();   // the handler 
req.send(null);
alert("wtf");
}

function checkState(){ 
alert("WTF!");
   if (req.readyState == 4) 
   { 
        var doc = eval('(' + req.responseText + ')'); 
	alert("WTF!");
   }
} 

 

}
</script>
</header>
<body>
<a onclick="test_json()"> get json object </a>
<span id="text_space"></span>
</body>
</html>
